/**
 * 服务端通用响应结构.
 */
export class HttpResponse {

    // 判断是否正常请求.
    public static isOk(resp: HttpResponse): boolean {
        return resp && resp.code === 0;
    }

    public readonly code: number = -1;
    public readonly errMsg: string = "OK";
    public readonly timestamp: number = 0;
    public readonly version: string;
    public readonly data: any = null;
    public readonly dates: any = null;
}
